<template>
<div class="header">
  <div class="header-left">
    <div class="iconfont icon-back">&#xe663;</div>
  </div>
  <div class="header-input">
    <span class="iconfont">&#xe688;</span>
    输入城市/景点/游玩主题
  </div>
  <router-link to="/city" class="header-right" tag="div">
    {{ this.city }}
    <span class="iconfont icon-narrow">&#xe6aa;</span>
  </router-link>
</div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
	computed:	{
		...mapState(['city'])
	}
}
</script>

<style lang="stylus" scoped>
@import '~styles/varibles.styl'
.header
  display: flex
  line-height: 0.86rem
  background: $bgColor
  color: #fff
  .header-left
    width: .64rem
    .icon-back
      text-align: center
      font-size: .4rem
  .header-input
    flex: 1
    background: #fff
    border-radius: .1rem
    height: .64rem
    line-height: .64rem
    margin-top: .11rem
    margin-left: .12rem
    color: #ccc
    padding: 0 .12rem
  .header-right
    min-width: 1.04rem
    text-align: center
    padding: 0 .1rem
    .icon-narrow
      font-size: .3rem
      margin-left: -0.1rem
</style>
